<template>
  <!-- 首屏优化 -->
  <FirstLoading v-if="isLoading" />
  <HomeBody v-else />
</template>

<script setup>
import { defineAsyncComponent, onMounted, ref } from "vue";
import FirstLoading from "@/components/FirstLoading.vue";

const isLoading = ref(true);

const HomeBody = defineAsyncComponent(() => {
  return import("./components/MainBody.vue");
});

onMounted(() => {
  setTimeout(() => {
    isLoading.value = false;
  }, 3000);
});
</script>